package com.loong.loong.hik.api.entity.resource;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import lombok.Data;

/**
 * 【监控点】CameraDTO属性说明
 * @author jinyiang
 * @date 2023/3/22 10:03
 */
@Data
@TableName("hik_resource_camera")
public class HikResourceCamera {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "监控点编号")
	@TableId(value = "index_code", type = IdType.ASSIGN_ID)
	@NotBlank(message = "监控点编号不能为空")
	private String indexCode;

	@ApiModelProperty(value = "所属区域")
	@TableField("region_index_code")
	@NotBlank(message = "所属区域不能为空")
	private String regionIndexCode;

	@ApiModelProperty(value = "所属区域路径")
	@TableField("region_path")
	@NotBlank(message = "所属区域路径不能为空")
	private String regionPath;

	@ApiModelProperty(value = "监控点国标编号")
	@TableField("external_index_code")
	private String externalIndexCode;

	@ApiModelProperty(value = "监控点名称")
	@TableField("name")
	@NotBlank(message = "监控点名称不能为空")
	private String name;

	@ApiModelProperty(value = "父级资源编号")
	@TableField("parent_index_code")
	private String parentIndexCode;

	@ApiModelProperty(value = "经度")
	@TableField("longitude")
	@Pattern(regexp = "^[-\\+]?\\d+(\\.\\d{1,8})?$", message = "经度格式不正确")
	private String longitude;

	@ApiModelProperty(value = "纬度")
	@TableField("latitude")
	@Pattern(regexp = "^[-\\+]?\\d+(\\.\\d{1,8})?$", message = "纬度格式不正确")
	private String latitude;

	@ApiModelProperty(value = "海拔高度")
	@TableField("elevation")
	@Pattern(regexp = "^[-\\+]?\\d+(\\.\\d{1,8})?$", message = "海拔高度格式不正确")
	private String elevation;

	@ApiModelProperty(value = "监控点类型")
	@TableField("camera_type")
	@NotNull(message = "监控点类型不能为空")
	private Integer cameraType;

	@ApiModelProperty(value = "安装位置")
	@TableField("install_location")
	@Size(max = 64, message = "安装位置长度不能超过64")
	private String installLocation;

	@ApiModelProperty(value = "通道号")
	@TableField("chan_num")
	private Integer chanNum;

	@ApiModelProperty(value = "级联编号")
	@TableField("cascade_code")
	@Size(max = 64, message = "级联编号长度不能超过64")
	private String cascadeCode;

	@ApiModelProperty(value = "所属DAC编号")
	@TableField("dac_index_code")
	@Size(max = 64, message = "所属DAC编号长度不能超过64")
	private String dacIndexCode;

	@ApiModelProperty(value = "设备能力集(含设备上的智能能力)")
	@TableField("capability")
	@Size(max = 256, message = "设备能力集长度不能超过256")
	private String capability;

	@ApiModelProperty(value = "录像存储位置")
	@TableField("record_location")
	@Size(max = 32, message = "录像存储位置长度不能超过32")
	private String recordLocation;

	@ApiModelProperty(value = "通道子类型")
	@TableField("channel_type")
	@NotBlank(message = "通道子类型不能为空")
	@Size(max = 32, message = "通道子类型长度不能超过32")
	private String channelType;

	@ApiModelProperty(value = "传输协议")
	@TableField("trans_type")
	private Integer transType;

	@ApiModelProperty(value = "接入协议")
	@TableField("treaty_type")
	@NotBlank(message = "接入协议不能为空")
	@Size(max = 32, message = "接入协议长度不能超过32")
	private String treatyType;
	@ApiModelProperty(value = "创建时间")
	@TableField(value = "create_time", fill = FieldFill.INSERT)
	@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
	private String createTime;

	@ApiModelProperty(value = "更新时间")
	@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
	@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
	private String updateTime;
}
